package io.renren.common.utils;

import org.apache.commons.lang.StringUtils;

public class StrUtils {

    /**
     * 铭牌名输入2个汉字时，自动在名字中间加空格，跟三个汉字的名字左右对齐
     *
     * @param twoCharatersName
     * @return
     */
    public static String nameAutoFill(String twoCharatersName) {
        String name = twoCharatersName;
        if (StringUtils.length(twoCharatersName) == 2) {
            name = twoCharatersName.substring(0, 1) + "  " + twoCharatersName.substring(1, 2);
        }

        return name;
    }
}
